﻿using System;
using K9Nano.IM.Models;

namespace K9Nano.IM.Areas.Chat.Dto
{
    public class ChatUser
    {
        public static ChatUser Guest(Guid appId)
        {
            return new ChatUser
            {
                Id = Guid.NewGuid(),
                Name = "游客",
                Nickname = "游客",
                AppId = appId,
                Avatar = "/images/guest.png",
                ITCode = string.Empty
            };
        }

        public static ChatUser Robot(Guid appId)
        {
            return new ChatUser
            {
                Id = Constants.Chat_Robot_Id,
                Name = "机器客服",
                Nickname = "机器客服",
                AppId = appId,
                Avatar = "/images/ai.jpg",
                ITCode = string.Empty
            };
        }

        public Guid Id { get; set; }

        public string Name { get; set; }

        public string Nickname { get; set; }

        public Guid AppId { get; set; }

        public string Avatar { get; set; }

        public string ITCode { get; set; }

        public ChatUser()
        {
            
        }

        public ChatUser(User user)
        {
            Id = user.ID;
            Avatar = user.Avatar;
            Nickname = user.Nickname;
            Name = user.Name;
            AppId = user.AppId;
            ITCode = ITCode;
        }
    }
}